(function($){
$.fn.fixed = function(o){
	var o = $.extend({
		target: '#header',
		f_time: 2000,
		f_top: 80
	}, o || {});
	var obj = $(o.target).get(0);
	var isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest;
	function init(){
		$(window).scroll(function(){
			if((document.documentElement.scrollTop +document.body.scrollTop) >= o.f_top){
				if(!isIE6){
					$(o.target).css({'position':'fixed','top':0});
				}else{
					if (document.body.currentStyle.backgroundAttachment != "fixed") {
						if (document.body.currentStyle.backgroundImage == "none") {
							document.body.runtimeStyle.backgroundImage = "url(none.gif)"; // dummy
							document.body.runtimeStyle.backgroundAttachment = "fixed";
						}
					}
					obj.style.position = 'absolute';
					obj.style.setExpression("top", "eval((document.documentElement.scrollTop || document.body.scrollTop)) + 'px'");
				}
			}else{
				$(o.target).css({'position':'static'});
			}
		})
	}
	return init();
}
})(jQuery);